<?php
class Application_Model_Schema_ObjectType {
	protected $_id;
	protected $_name;

	public function __set($name, $value) {
		$method = 'set' . $name;
		if(!method_exists($this, $method)) {
			throw new Exception('Set Invalid Object Type Property');
		}
		$this->$method($value);
	}

	public function __get($name) {
		$method = 'get' . $name;
		if(!method_exists($this, $method)) {
			throw new Exception('Get Invalid Object Type Property');
		}
		return $this->$method();
	}

	public function setId($id) {
		$this->_id = (int) $id;
		return $this;
	}

	public function getId() {
		return $this->_id;
	}
	
	public function setName($name) {
		$this->_name = (string) $name;
		return $this;
	}

	public function getName() {
		return $this->_name;
	}
}
?>